<div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">
    <div class="row ">
        <div class="col-sm-2 col-sm-offset-10">
            <button class="btn btn-block btn-info" ng-click="add()">添加广告</button> 
        </div>

    </div>

</div>
</div>
</div>
<!-- searchArea -->
<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
              <tr>
                <th class="text-center" style="width:17%">广告名称</th>
                <th class="text-center" style="width:10%">广告类别</th>
                <th class="text-center" style="width:10%">总观看人数</th>
                <th class="text-center" style="width:10%">已观看人数</th> 
                <th class="text-center" style="width:7%">排序</th> 
                <th class="text-center" style="width:8%">状态</th> 
                <th class="text-center" style="width:10%">开启时间</th> 
                <th class="text-center" style="width:10%">结束时间</th>
                <th class="text-center" style="width:8%">用户可见/不可见</th> 
                <th class="text-center" style="width:10%">操作</th>
              </tr> 
            </thead>
            <tbody>
              <tr ng-repeat="obj in objs">
                <td class="text-center" style="width:17%; text-align:center;vertical-align:middle;">{{obj.title}}</td>
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">
                    <p class="" ng-show="obj.ad_type == '1'">自定义图文</p>
                    <p class="" ng-show="obj.ad_type == '2'">自定义图文+公众号图文</p>
                    <p class="" ng-show="obj.ad_type == '3'">自定义图文+公众号</p>
                    <p class="" ng-show="obj.ad_type == '4'">自定义图文+公众号图文+公众号</p>  
                </td>
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">{{obj.total_num}}</td>
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">{{obj.now_num}}</td> 
                <td class="text-center" style="width:7%; text-align:center;vertical-align:middle;">{{obj.asort}}</td> 
                <td class="text-center" style="width:8%; text-align:center;vertical-align:middle;">
                    <p class="" ng-show="obj.see_state == '0'">不可见</p>
                    <p class="" ng-show="obj.see_state == '1'">可见</p>
                </td>  
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">{{obj.start_time}}</td> 
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">{{obj.end_time}}</td>       
                <td class="" style="width:8%; vertical-align:middle;">
                    <label class="i-switch bg-success" ng-init="obj.isSelected" style="margin-left:25%">
                        <input type="checkbox" ng-model="obj.isSelected" ng-change="onChange(obj.isSelected, obj.id, obj.state)">
                        <i></i>
                    </label>
                </td>        
                <td class="text-center" style="width:10%; text-align:center;vertical-align:middle;">
                  <a ng-click="edit(obj)" class="btn btn-info btn-xs">编辑</a>
                  <a ng-click="delete(obj.id)" class="btn btn-danger btn-xs">删除</a>
                  <a ng-click="typeadlist(obj.ad_type,obj.id)" class="btn btn-success btn-xs">分类广告</a> 
                  <a ng-click="getaddress(obj.id)" class="btn btn-primary btn-xs" ng-show="obj.ad_type == '2' || obj.ad_type == '3' ||obj.ad_type == '4'">获取地址</a>                  
                </td>
              </tr>
            </tbody>
        </table>
        <div class="text-right">
             <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="getlist()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
    </div>
</div>

</div>
